package com.xc.ezplan.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.xc.ezplan.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.RequiredArgsConstructor;

/**
 * @author lixingchen
 * @date 2022/11/15
 * @description 后台本地存储表
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="admin_local_storage")
@Data
@ApiModel(description = "本地存储实体")
@RequiredArgsConstructor
public class AdminLocalStorage extends BaseEntity {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "本地存储ID")
    private Long id;

    /**
     * 文件真实的名称
     */
    @ApiModelProperty(value = "文件真实的名称")
    private String realName;

    /**
     * 文件名
     */
    @ApiModelProperty(value = "文件名")
    private String name;

    /**
     * 后缀
     */
    @ApiModelProperty(value = "后缀")
    private String suffix;

    /**
     * 路径
     */
    @ApiModelProperty(value = "路径")
    private String path;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    private String type;

    /**
     * 大小
     */
    @ApiModelProperty(value = "大小")
    private String size;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public AdminLocalStorage(String realName,String name, String suffix, String path, String type, String size) {
        this.realName = realName;
        this.name = name;
        this.suffix = suffix;
        this.path = path;
        this.type = type;
        this.size = size;
    }
}